<template>
	<view>
		<view class="title">
			<uni-icons @click="back()" type="back" size="30"></uni-icons>
			<view class="title-text">
				<text>{{ title }}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "activutyTitle",
		props: {
			title: String,
			addressBack:String
		},
		data() {
			return {}
		},
		methods: {
			back() {
				if (this.addressBack) {
					this.$tab.switchTab(this.addressBack);
				}else{
					this.$tab.navigateBack()
				}
			},
		},
		onLoad() {
			const systemInfo = uni.getSystemInfoAsync()
		}
	}
</script>

<style>
	.title {
		width: 100%;
		height: 10vh;
		background-color: #2BA245;
		display: flex;
		justify-content: flex-start;
		align-items: center;
		padding-left: 10rpx;
		padding-top: 70rpx;
	}

	.title-text {
		height: 60rpx;
		line-height: 60rpx;
		font-size: 30rpx;
	}
</style>
